<template>
  <div class="home-TUIKit-main">
    <div class="conversation">
      <TUISearch class="TUIKit-search" />
      <TUIConversation />
    </div>
    <div class="TUIKit-chat">
      <TUIChat/>
    </div>
  </div>
</template>

<script setup>
import { reactive, ref, getCurrentInstance, toRefs } from 'vue';
import { TUILogin } from "@tencentcloud/tui-core";
import { isPC } from '../../TUIKit/utils/env';
//初始化TUIKit环境
const data = reactive({        env: isPC    });
const { proxy } = getCurrentInstance();
proxy.$http("/front/customer/im/createAccount", "GET", null, true, function (resp) {
  let result = resp.result
  let account = result.account;
  let sdkAppId = result.sdkAppId
  let userSig = result.userSig
  //登陆客户IM账号
  TUILogin.login({
    SDKAppID:sdkAppId,
    userID: account,
    userSig: userSig,
  });
})
</script>




<style lang="less">
  @import url("customer_im.less");
</style>